The present invention relates to processor-based appliances and more particularly, to a processor-based appliance, whose memory unit includes both a nonvolatile memory such as a flash memory and a volatile cache memory that is robust under sudden power failure.
Flash memory is in wide use as a cost-effective non-volatile memory. Its inherent weaknesses are in the need to erase relatively large blocks of data all together prior to writing on them, the need to use an increased level of electrical voltage for such an erase, and the relatively limited number of writing cycles to the memory before the memory wears and becomes unusable. In response to these weaknesses, there have been developed techniques for caching data prior to writing them to the flash memory, boosting the voltage for writing and erasing data, and increasing the longevity of the memory by evening the wear over the memory blocks. See, for example, Honma et al., U.S. Pat. No. 5,606,529, Terrell, II et al., U.S. Pat. No. 6,026,027, and Pashley et al., U.S. Pat. No. 6,418,506, which patents arc incorporated by reference for all purposes as if fully set forth herein, for prior art methods of caching data in a volatile memory prior to writing the data to a flash memory.
Flash memory is used in cooperation with a host device, i.e., a computer or a computerized device such as a digital camera, an electronic telephone, a MP3 player, etc. In some cases the flash memory is permanently embedded in the host device, and in other cases the flash memory is detachable. There is a lot of flexibility in distributing tasks between the flash memory module and the host device. For instance, caching the data, boosting the power or evening the wear could be services provided by the host device to the flash memory module, or alternatively these services can be implemented by components and logic integrated into the flash memory unit, or a combination of the two approaches can be used. In practice, because flash memory design has become the expertise of its providers and designers, and because with detachable modules a specific memory unit may need to interface with host devices of various providers and designs. it has become common to integrate the components specific to the flash memory unit into that unit, and to rely minimally on specialized services provided by the host devices. In particular, the charge pump circuitry for boosting the voltage is often embedded within the physical chip containing the nonvolatile memory module.
Thus, the common design of flash memory units involves receiving basic power supply (typically, 3.3V) from the host device and exchanging data streams between the host device and the flash memory unit. Caching and voltage-boosting are commonly done using components and logic included in the flash memory unit.
In case of failure of the power supplied from the host device to the flash memory unit, the content of the cache are lost. In critical applications, the provider of the host device backs up the power supply, for instance by using an uninterrupted power supply (UPS) or a battery backup. In other cases the designer of the flash memory unit must carefully select the data cached in the unit's volatile memory in order to minimize the damage in case of power interruption. For instance, critical data related to the file allocation table (FAT) are written immediately to the non-volatile memory, without being cached, in order to avoid loss of the entire data stored in the flash memory in case of power failure. These critical data change frequently, and so must be written frequently to the non-volatile memory, leading to increased writing cycles to the flash memory, which is time consuming and increases the wear of the flash memory.
Thus, according to the prior art there is a conflict between the need to increase the amount of frequently-accessed data cached within a flash memory unit in order to increase efficiency and reduce wear, and the need to reduce such caching for minimizing the damage in case of failure in the supply of power from the host device to the flash memory unit.